
#include "simple_memory_store.h"

bool SimpleMemStore::Get(const std::string& key, std::string& v) const {
	v.clear();
	KeyValueMap::const_iterator it = values_.find(key);
	if (it == values_.end())
		return false;
	v = it->second;
	return true;
}

bool SimpleMemStore::Set( const std::string& key, const std::string& v ) {
	values_[key] = v;
	return true;
}

bool SimpleMemStore::Has( const std::string& key ) const {
	return values_.find(key) != values_.end();
}